﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SX.Data
{
    /// <summary>
    /// 读写分析数据库链接帮助类
    /// </summary>
    public static class ConnectionStringHelper
    {
        private  static  IConnectionString _connCore = new DefaultConnectionString();

        public static void SetCore(IConnectionString conncore)
        {
            _connCore = conncore;
        }

        public static string GetWriteConnectionString(string conn)
        {
            return _connCore.GetWriteConnectionString(conn);
        }

        public static string GetReadConnectionString(string conn)
        {
            return _connCore.GetReadConnectionString(conn);
        }
    }
}
